/**
 * This code is released under lgpl v3 license.
 * All rights reserved.
*/

package flash.net;

import flash.events.BaseWrapper;
import javascript.util.Date;


/**
 *
 * @author yuan yunchang    dukerr@gmail.com
 */
public class FileReferenceWrapper extends BaseWrapper<FileReference>{
    
    public FileReferenceWrapper(String bridgeName) {
        super(bridgeName);
    }

    public FileReferenceWrapper(String bridgeName, boolean createNative) {
        super(bridgeName, createNative);
    }
    
    @Override
    public  void createNativeAS3Obj() {
        nativeAS3Obj = FileReference.createFileReference(this.bridgeName);
    }
    public boolean browse(){
       return nativeAS3Obj.browse();
    }
    public String getName(){
        return nativeAS3Obj.getName();
    }
    public double getSize(){
        return nativeAS3Obj.getSize();
    }
    public String getType(){
        return nativeAS3Obj.getType();
    }
    public void upload(URLRequest req,String fieldName){
        nativeAS3Obj.upload(req, fieldName);
    }
    public void cancel(){
        nativeAS3Obj.cancel();
    }
    public Date getCreationDate(){
        return nativeAS3Obj.getCreationDate();
    }
}
